package com.wkbb.common.enums;

public enum MpMenuTypeEnum {
    //公众号菜单类型枚举(type:1展开子菜单 2打开功能模块(URL) 3功能模块列表 4跳转小程序)
    /**
     * 展开子菜单
     */
    SUB_MENU((short) 1,"展开子菜单"),
    /**
     * 打开功能模块
     */
    OPEN_MODULE((short)2,"打开功能模块(URL)"),
    /**
     * 功能模块列表
     */
    MODULE_LIST((short)3,"功能模块列表"),

    /**
     * 跳转小程序
     */
    MINI_ROUTINE((short)4,"跳转小程序");



    private MpMenuTypeEnum(Short value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Short value;

    private String desc;

    public Short getValue() {
        return this.value;
    }

    public void setValue(Short value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Short value) {
        for (MpMenuTypeEnum addressListEnum : MpMenuTypeEnum.values()) {
            if (addressListEnum.getValue().intValue()==value) {
                return addressListEnum.getDesc();
            }
        }
        return null;
    }
}
